1. Technical Field
The invention relates to the storage and playback of images and video segments on a display device for a digital computer, and more particularly relates to a system and a method of converting video information digitally coded using one luminance and two color difference signals to a three color component signal for reproduction. Still more particularly, the invention relates to a software based method for conversion of the data formats carrying color and luminance intensity information which is readily executed by a personal computer based on an Intel 80386SX microprocessor running at 16 Mhz.
2. Description of the Related Art
A video signal comprises a sequence of frames, which when displayed at a given frame rate (e.g., 15 to 30 frames-per-second in a personal computer), simulate the appearance of motion to a human observer. In a personal computer system, each frame of the video image comprises an matrix of picture elements or "pixels." A typical matrix may have 320 columns by 240 rows. A pixel is the minimum unit of the picture which may be assigned a luminance intensity, and in color video, a color. Depending upon the data format used, as many as three bytes of data can be used to define visual information for a pixel. A complete description of all pixels for an entire frame can require several hundred thousand bytes of data.
For a raw frame captured in a matrix of 640.times.480 pixels, a digitized representation in a 24-bit RGB (Red, Green and Blue) format requires about one million bytes of data to store the frame if compression is not applied to the data. For a video segment, if full frames were replaced at a frame rate of 30 frames per second, a computer would be required to recover from storage and write to video memory 30 million bytes of data each second. Few contemporary mass data storage devices have both the bandwidth required to pass such quantities of data or the storage capacity to hold more than a few minutes worth of digital video information. As used here, bandwidth means the volume of data per unit time which can be recovered from an auxiliary storage device. Data compression is used to accommodate auxiliary storage devices in the storage and recovery of video segments for playback in real time.
Data compression allows an image or video segment to be digitized and stored in substantially fewer bytes of data than required for full frame reproduction. Data compression can be based on eliminating redundant information from frame to frame in a digitized video segment, on eliminating redundant information from pixel to pixel in one frame, or by exploiting superior human perception of luminance intensity detail over color detail. High quality color images are typically captured and digitized in 24-bit RGB format (RGB24). In RGB24 one byte of data corresponds to the red (R) component contribution to a pixel, one byte of data corresponds to the green (G) component contribution to the pixel and one byte of data corresponds to the blue (B) component contribution to the pixel. Luminance intensity (Y) is then derived from a proportional combination of the three contributing components: EQU Y=0.299R+0.587G+0.144B.
The International Radio Consultative Committee (CCIR) in its Recommendation 601 called for digital coding of color images based instead on use of an explicit luminance intensity component (Y) and two color difference components (e.g. C.sub.R and C.sub.B for the red and blue difference signals, respectively). For compression, the CCIR coding methodology applies a four to one spatial subsampling of each of the color components. Successive two by two pixel regions of a digitized frame are encoded using an individual one byte luminance value for each pixel and two bytes of representative color difference values for the four pixel region. The methodology results in representation of four pixels with six bytes of information, or an average of one and one half bytes per pixel. Since the original RGB24 data consist of three bytes per pixel, compression of up to 50% is achieved.
Display adapters in common use on contemporary personal computers (e.g. Extended Graphics Array (XGA)) do not have a luminance-color difference display mode. Accordingly they cannot use a luminance-color format such as YC.sub.R C.sub.B. However, the YC.sub.R C.sub.B format can be converted an RGB format using the following equations: EQU R=MIN[255, MAX[0, y+1.402(C.sub.R -128))]], EQU G=MIN[255, MAX[0, (Y-0.174(C.sub.R -128)-0.344(C.sub.B -128))]], EQU B=MIN[255, MAX[0, (Y+1.772(C.sub.B -128))]].
Use of the conversion equations requires six comparison, four multiplication and six addition operations for every pixel. Multiplication operations are relatively complex compared with additions and comparisons. The computational burden presented by the number of required operations is excessive for the microprocessors used in some personal computers if conversion of formats is to be handled through the computer central processing unit. For example, an Intel 80386SX microprocessor clocked at 16 Mhz will struggle to maintain a 5 frame per second replacement rate and cannot maintain a 15 to 30 frame per second frame replacement rate if required to carry out the above conversion steps. An attempt to so use it results in degradation of the rate of frame replacement and slowing of the reproduced video segment.
An alternative to the direct assault on the problem represented by use of the conversion equations is to use lookup tables (LUT). Such lookup tables would represent the results of execution of the conversion equations on at least a set of the possible input values for Y, C.sub.R and C.sub.B prior to their actual receipt. Upon receipt of a set of values for a pixel in YC.sub.R C.sub.B format, the values are used as indices into lookup tables to return an RGB representation. From the above conversion equations we can see that the red and blue values each depend upon two of the three components of the YC.sub.R C.sub.B format. The green component depends upon all three components in the YC.sub.R C.sub.B format. Where each component in the YC.sub.R C.sub.B format is represented in one byte it can be shown that the red and blue components for the RGB format will each require a 2.sup.16 bytes or a 64 Kbyte lookup table. However, the green component would require 2.sup.24 bytes, or a 16 Mbyte lookup table. Lookup tables for all three components of the RGB formatted data would consume 16.125 Mbytes of data storage, which is excessive in most applications and untenable in most personal computers where 1 to 4 Mbytes is a common capacity for memory.